package cyf.Owner.dao;


import cyf.Owner.bean.CarVo;
import cyf.Owner.bean.OwnerVo;
import cyf.Tools.ServerResponse;
import org.apache.ibatis.annotations.Param;

import java.security.acl.Owner;
import java.util.*;

public interface OwnerDao {
    //分页获取所有业主
    public List<OwnerVo> getAllOwner(Map<String,Object> param);

    /**获取表中记录的总行数,我们要根据这个结果计算总页数*/
    int getRowCount();

    /**获取车辆查询的总数**/
    int getCarsRowCount(Map<String,Object> param);

    //插入一条业主信息
    public boolean insertOwner(Map<String,Object> param);

    //插入一条业主的车辆
    public boolean insertCar(Map<String,Object> param);

    //获取一辆车
    public List<CarVo> getCars(Map<String,Object> param);

    //根据业主或车牌号获取车辆
    public List<CarVo> getCarsByOwner(Map<String,Object> param);

    //根据车牌号删除一个车辆
    public boolean deleteCayByPlate(Map<String,Object> param);

    //删除一个业主信息
    public boolean deleteOwnerBySfz(Map<String,Object> param);

    //删除该业主下的车辆信息
    public boolean deleteCarByOwner(Map<String,Object> param);

}
